﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

using Phoenix.AppCode.Entities;
using Phoenix.AppCode.Data;
using System.Data;

namespace Phoenix.AppCode.Bussiness
{
    public class TrackingEService
    {
        public TrackingEService() 
        {
            //
            // TODO: Add constructor logic here
            //    
        }
        public static DataTable GetTrackByNumber(TrackingE tracking)
        {
            TrackingEDAO trackingDAO = new TrackingEDAO();
            return trackingDAO.GetTrackByNumber(tracking);
        }

        #region Backend Method
        /// <summary>
        /// Create 
        /// </summary>
        /// <param name="trackinge"></param>
        public static void Create(TrackingE trackinge)
        {
            TrackingEDAO trackingeDAO = new TrackingEDAO();
            trackingeDAO.Create(trackinge);
        }

        /// <summary>
        /// Edit
        /// </summary>
        /// <param name="trackinge"></param>
        public static void Edit(TrackingE trackinge)
        {
            TrackingEDAO trackingeDAO = new TrackingEDAO();
            trackingeDAO.Edit(trackinge);
        }

        /// <summary>
        /// On/Off
        /// </summary>
        /// <param name="trackinge"></param>
        public static void OnOff(TrackingE trackinge)
        {
            TrackingEDAO trackingeDAO = new TrackingEDAO();
            trackingeDAO.OnOff(trackinge);
        }

        /// <summary>
        /// Delete
        /// </summary>
        /// <param name="trackinge"></param>
        public static void Delete(TrackingE trackinge)
        {
            TrackingEDAO trackingeDAO = new TrackingEDAO();
            trackingeDAO.Delete(trackinge);
        }

        /// <summary>
        /// Show all
        /// </summary>
        /// <param name="language"></param>
        /// <returns></returns>
        public static DataTable TrackingEList() {
            TrackingEDAO trackingeDAO = new TrackingEDAO();
            return trackingeDAO.TrackingEList();
        }
        
        /// <summary>
        /// Show data by ID
        /// </summary>
        /// <param name="idtrackinge"></param>
        /// <returns></returns>
        public static DataTable TrackingEList_GetByID(int idtrackinge)
        {
            TrackingEDAO trackingeDAO = new TrackingEDAO();
            return trackingeDAO.TrackingEList_GetByID(idtrackinge);
        }

        /// <summary>
        /// Get ID to edit or delete 
        /// </summary>
        /// <param name="idtrackinge"></param>
        /// <returns></returns>
        public static TrackingE GetTrackingEByID(int idtrackinge)
        {
            TrackingEDAO trackingeDAO = new TrackingEDAO();
            return trackingeDAO.GetTrackingEByID(idtrackinge);
        }
        #endregion
    }
}